from flask import Flask, render_template

app = Flask(__name__)

# 加载配置文件
app.config.from_object('config.settings.DevSettings')
app.config.from_object('config.settings.ProdSettings')


def index():
    print(app.config['HOST'])
    return 'index'
# 参数1: url, 参数2:endpoint, 参数3:函数名
app.add_url_rule('/index', 'index', index)


@app.route('/login')
def login():
    print(app.config['HOST'])
    return 'index'


if __name__ == '__main__':
    app.run()
